using Easislides.Properties;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace Easislides
{
	public class FrmShowAlert : Form
	{
		public delegate void Message(int MsgCode, string MsgString);
		private IContainer components = null;
		private GroupBox groupBox1;
		private Label label1;
		private ComboBox cbMessageAlert;
		private Button MessageShow;
		private Button BtnStop1;
		private GroupBox groupBox2;
		private Label label3;
		private Button ParentalShow;
		private Label label2;
		private Timer TimerRestoreWindow;
		private TextBox ParentalPrefix;
		private ComboBox cbParentalAlert;
		private Panel panel2;
		private ToolStrip toolStripMessageBtns;
		private ToolStripButton Message_Scroll;
		private ToolStripButton Message_Flash;
		private Panel panel1;
		private ToolStrip toolStripParentalBtns;
		private ToolStripButton Parental_Scroll;
		private ToolStripButton Parental_Flash;
		private ToolStripButton Message_Transparent;
		private ToolStripButton Parental_Transparent;
		private Button BtnCancel;
		private Button BtnStop2;
		private Button btnClearHistoryMessage;
		private Button btnClearHistoryParental;
		private GroupBox groupBox3;
		private RichTextBox tbLyricsAlert;
		private Button btnClearLyrics;
		private Button LyricsShow;
		private string FormRegLeft = "ShowAlertLeft";
		private string FormRegTop = "ShowAlertTop";
		public event FrmShowAlert.Message OnMessage
		{
			[MethodImpl(MethodImplOptions.Synchronized)]
			add
			{
                //this.OnMessage = (FrmShowAlert.Message)Delegate.Combine(this.OnMessage, value);
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			remove
			{
                //this.OnMessage = (FrmShowAlert.Message)Delegate.Remove(this.OnMessage, value);
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.btnClearHistoryMessage = new System.Windows.Forms.Button();
            this.panel2 = new System.Windows.Forms.Panel();
            this.toolStripMessageBtns = new System.Windows.Forms.ToolStrip();
            this.cbMessageAlert = new System.Windows.Forms.ComboBox();
            this.label1 = new System.Windows.Forms.Label();
            this.MessageShow = new System.Windows.Forms.Button();
            this.BtnStop1 = new System.Windows.Forms.Button();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.btnClearHistoryParental = new System.Windows.Forms.Button();
            this.panel1 = new System.Windows.Forms.Panel();
            this.toolStripParentalBtns = new System.Windows.Forms.ToolStrip();
            this.cbParentalAlert = new System.Windows.Forms.ComboBox();
            this.BtnStop2 = new System.Windows.Forms.Button();
            this.ParentalPrefix = new System.Windows.Forms.TextBox();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.ParentalShow = new System.Windows.Forms.Button();
            this.TimerRestoreWindow = new System.Windows.Forms.Timer(this.components);
            this.BtnCancel = new System.Windows.Forms.Button();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.tbLyricsAlert = new System.Windows.Forms.RichTextBox();
            this.LyricsShow = new System.Windows.Forms.Button();
            this.btnClearLyrics = new System.Windows.Forms.Button();
            this.Parental_Scroll = new System.Windows.Forms.ToolStripButton();
            this.Parental_Flash = new System.Windows.Forms.ToolStripButton();
            this.Parental_Transparent = new System.Windows.Forms.ToolStripButton();
            this.Message_Scroll = new System.Windows.Forms.ToolStripButton();
            this.Message_Flash = new System.Windows.Forms.ToolStripButton();
            this.Message_Transparent = new System.Windows.Forms.ToolStripButton();
            this.groupBox1.SuspendLayout();
            this.panel2.SuspendLayout();
            this.toolStripMessageBtns.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.panel1.SuspendLayout();
            this.toolStripParentalBtns.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.SuspendLayout();
            // 
            // groupBox1
            // 
            this.groupBox1.BackColor = System.Drawing.SystemColors.Control;
            this.groupBox1.Controls.Add(this.btnClearHistoryMessage);
            this.groupBox1.Controls.Add(this.panel2);
            this.groupBox1.Controls.Add(this.cbMessageAlert);
            this.groupBox1.Controls.Add(this.label1);
            this.groupBox1.Controls.Add(this.MessageShow);
            this.groupBox1.Controls.Add(this.BtnStop1);
            this.groupBox1.Location = new System.Drawing.Point(8, 7);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(307, 92);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Message Alert";
            // 
            // btnClearHistoryMessage
            // 
            this.btnClearHistoryMessage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnClearHistoryMessage.Location = new System.Drawing.Point(121, 62);
            this.btnClearHistoryMessage.Name = "btnClearHistoryMessage";
            this.btnClearHistoryMessage.Size = new System.Drawing.Size(87, 24);
            this.btnClearHistoryMessage.TabIndex = 9;
            this.btnClearHistoryMessage.Text = "Clear History";
            this.btnClearHistoryMessage.Click += new System.EventHandler(this.btnClearHistoryMessage_Click);
            // 
            // panel2
            // 
            this.panel2.Controls.Add(this.toolStripMessageBtns);
            this.panel2.Location = new System.Drawing.Point(11, 63);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(76, 22);
            this.panel2.TabIndex = 8;
            // 
            // toolStripMessageBtns
            // 
            this.toolStripMessageBtns.AutoSize = false;
            this.toolStripMessageBtns.CanOverflow = false;
            this.toolStripMessageBtns.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripMessageBtns.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripMessageBtns.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.Message_Scroll,
            this.Message_Flash,
            this.Message_Transparent});
            this.toolStripMessageBtns.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStripMessageBtns.Location = new System.Drawing.Point(0, -1);
            this.toolStripMessageBtns.Name = "toolStripMessageBtns";
            this.toolStripMessageBtns.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripMessageBtns.Size = new System.Drawing.Size(76, 25);
            this.toolStripMessageBtns.TabIndex = 0;
            // 
            // cbMessageAlert
            // 
            this.cbMessageAlert.FormattingEnabled = true;
            this.cbMessageAlert.Location = new System.Drawing.Point(10, 36);
            this.cbMessageAlert.Name = "cbMessageAlert";
            this.cbMessageAlert.Size = new System.Drawing.Size(198, 21);
            this.cbMessageAlert.TabIndex = 0;
            this.cbMessageAlert.Enter += new System.EventHandler(this.cbMessageAlert_Enter);
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(12, 20);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(31, 13);
            this.label1.TabIndex = 1;
            this.label1.Text = "Alert:";
            // 
            // MessageShow
            // 
            this.MessageShow.Location = new System.Drawing.Point(214, 35);
            this.MessageShow.Name = "MessageShow";
            this.MessageShow.Size = new System.Drawing.Size(81, 24);
            this.MessageShow.TabIndex = 3;
            this.MessageShow.Text = "Go Live";
            this.MessageShow.Click += new System.EventHandler(this.MessageShow_Click);
            // 
            // BtnStop1
            // 
            this.BtnStop1.Location = new System.Drawing.Point(214, 63);
            this.BtnStop1.Name = "BtnStop1";
            this.BtnStop1.Size = new System.Drawing.Size(81, 24);
            this.BtnStop1.TabIndex = 2;
            this.BtnStop1.Text = "Stop Alert";
            this.BtnStop1.Click += new System.EventHandler(this.BtnStop_Click);
            // 
            // groupBox2
            // 
            this.groupBox2.BackColor = System.Drawing.SystemColors.Control;
            this.groupBox2.Controls.Add(this.btnClearHistoryParental);
            this.groupBox2.Controls.Add(this.panel1);
            this.groupBox2.Controls.Add(this.cbParentalAlert);
            this.groupBox2.Controls.Add(this.BtnStop2);
            this.groupBox2.Controls.Add(this.ParentalPrefix);
            this.groupBox2.Controls.Add(this.label2);
            this.groupBox2.Controls.Add(this.label3);
            this.groupBox2.Controls.Add(this.ParentalShow);
            this.groupBox2.Location = new System.Drawing.Point(8, 105);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(307, 92);
            this.groupBox2.TabIndex = 1;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Parental Alert";
            // 
            // btnClearHistoryParental
            // 
            this.btnClearHistoryParental.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnClearHistoryParental.Location = new System.Drawing.Point(121, 62);
            this.btnClearHistoryParental.Name = "btnClearHistoryParental";
            this.btnClearHistoryParental.Size = new System.Drawing.Size(87, 24);
            this.btnClearHistoryParental.TabIndex = 14;
            this.btnClearHistoryParental.Text = "Clear History";
            this.btnClearHistoryParental.Click += new System.EventHandler(this.btnClearHistoryParental_Click);
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.toolStripParentalBtns);
            this.panel1.Location = new System.Drawing.Point(10, 65);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(77, 22);
            this.panel1.TabIndex = 13;
            // 
            // toolStripParentalBtns
            // 
            this.toolStripParentalBtns.AutoSize = false;
            this.toolStripParentalBtns.CanOverflow = false;
            this.toolStripParentalBtns.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripParentalBtns.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripParentalBtns.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.Parental_Scroll,
            this.Parental_Flash,
            this.Parental_Transparent});
            this.toolStripParentalBtns.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStripParentalBtns.Location = new System.Drawing.Point(0, -1);
            this.toolStripParentalBtns.Name = "toolStripParentalBtns";
            this.toolStripParentalBtns.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripParentalBtns.Size = new System.Drawing.Size(77, 25);
            this.toolStripParentalBtns.TabIndex = 1;
            // 
            // cbParentalAlert
            // 
            this.cbParentalAlert.FormattingEnabled = true;
            this.cbParentalAlert.Location = new System.Drawing.Point(116, 36);
            this.cbParentalAlert.Name = "cbParentalAlert";
            this.cbParentalAlert.Size = new System.Drawing.Size(92, 21);
            this.cbParentalAlert.TabIndex = 0;
            this.cbParentalAlert.Enter += new System.EventHandler(this.cbParentalAlert_Enter);
            // 
            // BtnStop2
            // 
            this.BtnStop2.Location = new System.Drawing.Point(214, 64);
            this.BtnStop2.Name = "BtnStop2";
            this.BtnStop2.Size = new System.Drawing.Size(81, 24);
            this.BtnStop2.TabIndex = 5;
            this.BtnStop2.Text = "Stop Alert";
            this.BtnStop2.Click += new System.EventHandler(this.BtnStop_Click);
            // 
            // ParentalPrefix
            // 
            this.ParentalPrefix.BackColor = System.Drawing.SystemColors.Control;
            this.ParentalPrefix.Location = new System.Drawing.Point(10, 37);
            this.ParentalPrefix.Name = "ParentalPrefix";
            this.ParentalPrefix.ReadOnly = true;
            this.ParentalPrefix.Size = new System.Drawing.Size(100, 20);
            this.ParentalPrefix.TabIndex = 1;
            this.ParentalPrefix.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(161, 20);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(31, 13);
            this.label2.TabIndex = 1;
            this.label2.Text = "Alert:";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(12, 20);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(36, 13);
            this.label3.TabIndex = 12;
            this.label3.Text = "Prefix:";
            // 
            // ParentalShow
            // 
            this.ParentalShow.Location = new System.Drawing.Point(214, 35);
            this.ParentalShow.Name = "ParentalShow";
            this.ParentalShow.Size = new System.Drawing.Size(81, 24);
            this.ParentalShow.TabIndex = 4;
            this.ParentalShow.Text = "Go Live";
            this.ParentalShow.Click += new System.EventHandler(this.ParentalShow_Click);
            // 
            // TimerRestoreWindow
            // 
            this.TimerRestoreWindow.Interval = 1000;
            this.TimerRestoreWindow.Tick += new System.EventHandler(this.TimerRestoreWindow_Tick);
            // 
            // BtnCancel
            // 
            this.BtnCancel.Location = new System.Drawing.Point(129, 288);
            this.BtnCancel.Name = "BtnCancel";
            this.BtnCancel.Size = new System.Drawing.Size(80, 24);
            this.BtnCancel.TabIndex = 3;
            this.BtnCancel.Text = "Close";
            this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
            // 
            // groupBox3
            // 
            this.groupBox3.BackColor = System.Drawing.SystemColors.Control;
            this.groupBox3.Controls.Add(this.LyricsShow);
            this.groupBox3.Controls.Add(this.btnClearLyrics);
            this.groupBox3.Controls.Add(this.tbLyricsAlert);
            this.groupBox3.Location = new System.Drawing.Point(8, 203);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(307, 77);
            this.groupBox3.TabIndex = 6;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "Lyrics Monitor Alert";
            // 
            // tbLyricsAlert
            // 
            this.tbLyricsAlert.Location = new System.Drawing.Point(10, 19);
            this.tbLyricsAlert.Name = "tbLyricsAlert";
            this.tbLyricsAlert.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
            this.tbLyricsAlert.Size = new System.Drawing.Size(198, 50);
            this.tbLyricsAlert.TabIndex = 0;
            this.tbLyricsAlert.Text = "";
            this.tbLyricsAlert.Enter += new System.EventHandler(this.tbLyricsAlert_Enter);
            // 
            // LyricsShow
            // 
            this.LyricsShow.Image = global::Properties.Resources.send;
            this.LyricsShow.Location = new System.Drawing.Point(214, 19);
            this.LyricsShow.Name = "LyricsShow";
            this.LyricsShow.Size = new System.Drawing.Size(81, 24);
            this.LyricsShow.TabIndex = 7;
            this.LyricsShow.Text = "Send";
            this.LyricsShow.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.LyricsShow.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.LyricsShow.Click += new System.EventHandler(this.LyricsShow_Click);
            // 
            // btnClearLyrics
            // 
            this.btnClearLyrics.Image = global::Properties.Resources.clear;
            this.btnClearLyrics.Location = new System.Drawing.Point(214, 47);
            this.btnClearLyrics.Name = "btnClearLyrics";
            this.btnClearLyrics.Size = new System.Drawing.Size(81, 24);
            this.btnClearLyrics.TabIndex = 8;
            this.btnClearLyrics.Text = "Clear";
            this.btnClearLyrics.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.btnClearLyrics.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.btnClearLyrics.Click += new System.EventHandler(this.btnClearLyrics_Click);
            // 
            // Parental_Scroll
            // 
            this.Parental_Scroll.CheckOnClick = true;
            this.Parental_Scroll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Parental_Scroll.Image = global::Properties.Resources.scroll;
            this.Parental_Scroll.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Parental_Scroll.Name = "Parental_Scroll";
            this.Parental_Scroll.Size = new System.Drawing.Size(23, 22);
            this.Parental_Scroll.Tag = "";
            this.Parental_Scroll.ToolTipText = "Scroll";
            this.Parental_Scroll.Click += new System.EventHandler(this.ScrollFlashOption_Click);
            // 
            // Parental_Flash
            // 
            this.Parental_Flash.CheckOnClick = true;
            this.Parental_Flash.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Parental_Flash.Image = global::Properties.Resources.flash;
            this.Parental_Flash.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Parental_Flash.Name = "Parental_Flash";
            this.Parental_Flash.Size = new System.Drawing.Size(23, 22);
            this.Parental_Flash.Tag = "";
            this.Parental_Flash.ToolTipText = "Flash";
            this.Parental_Flash.Click += new System.EventHandler(this.ScrollFlashOption_Click);
            // 
            // Parental_Transparent
            // 
            this.Parental_Transparent.CheckOnClick = true;
            this.Parental_Transparent.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Parental_Transparent.Image = global::Properties.Resources.transparent;
            this.Parental_Transparent.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Parental_Transparent.Name = "Parental_Transparent";
            this.Parental_Transparent.Size = new System.Drawing.Size(23, 22);
            this.Parental_Transparent.ToolTipText = "Transparent";
            this.Parental_Transparent.Click += new System.EventHandler(this.ScrollFlashOption_Click);
            // 
            // Message_Scroll
            // 
            this.Message_Scroll.CheckOnClick = true;
            this.Message_Scroll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Message_Scroll.Image = global::Properties.Resources.scroll;
            this.Message_Scroll.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Message_Scroll.Name = "Message_Scroll";
            this.Message_Scroll.Size = new System.Drawing.Size(23, 22);
            this.Message_Scroll.Tag = "";
            this.Message_Scroll.ToolTipText = "Scroll";
            this.Message_Scroll.Click += new System.EventHandler(this.ScrollFlashOption_Click);
            // 
            // Message_Flash
            // 
            this.Message_Flash.CheckOnClick = true;
            this.Message_Flash.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Message_Flash.Image = global::Properties.Resources.flash;
            this.Message_Flash.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Message_Flash.Name = "Message_Flash";
            this.Message_Flash.Size = new System.Drawing.Size(23, 22);
            this.Message_Flash.Tag = "";
            this.Message_Flash.ToolTipText = "Flash";
            this.Message_Flash.Click += new System.EventHandler(this.ScrollFlashOption_Click);
            // 
            // Message_Transparent
            // 
            this.Message_Transparent.CheckOnClick = true;
            this.Message_Transparent.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Message_Transparent.Image = global::Properties.Resources.transparent;
            this.Message_Transparent.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Message_Transparent.Name = "Message_Transparent";
            this.Message_Transparent.Size = new System.Drawing.Size(23, 22);
            this.Message_Transparent.ToolTipText = "Transparent";
            this.Message_Transparent.Click += new System.EventHandler(this.ScrollFlashOption_Click);
            // 
            // FrmShowAlert
            // 
            this.AcceptButton = this.BtnCancel;
            this.ClientSize = new System.Drawing.Size(327, 326);
            this.Controls.Add(this.groupBox3);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.BtnCancel);
            this.Controls.Add(this.groupBox1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.Name = "FrmShowAlert";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.Text = "Show Alert";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmShowAlert_FormClosing);
            this.Load += new System.EventHandler(this.FrmShowAlert_Load);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.panel2.ResumeLayout(false);
            this.toolStripMessageBtns.ResumeLayout(false);
            this.toolStripMessageBtns.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.toolStripParentalBtns.ResumeLayout(false);
            this.toolStripParentalBtns.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.ResumeLayout(false);

		}
		public FrmShowAlert()
		{
			this.InitializeComponent();
		}
		private void FrmShowAlert_Load(object sender, EventArgs e)
		{
			gf.AlertFormOpen = true;
			int num = gf.GetRegValue("settings", this.FormRegLeft, 50);
			int num2 = gf.GetRegValue("settings", this.FormRegTop, 100);
			if (num < 0)
			{
				num = 0;
			}
			else
			{
				if (num > Screen.PrimaryScreen.Bounds.Width - base.Width)
				{
					num = Screen.PrimaryScreen.Bounds.Width - base.Width;
				}
			}
			if (num2 < 0)
			{
				num2 = 0;
			}
			else
			{
				if (num2 > Screen.PrimaryScreen.Bounds.Height - base.Height)
				{
					num2 = Screen.PrimaryScreen.Bounds.Height - base.Height;
				}
			}
			base.Top = num2;
			base.Left = num;
			this.LoadAlertList();
			this.cbParentalAlert.Text = gf.ParentalAlertDetails;
			this.Parental_Flash.Checked = gf.ParentalAlertFlash;
			this.Parental_Scroll.Checked = gf.ParentalAlertScroll;
			this.Parental_Transparent.Checked = gf.ParentalAlertTransparent;
			this.ParentalPrefix.Text = gf.ParentalAlertHeading + " ";
			this.cbMessageAlert.Text = gf.MessageAlertDetails;
			this.Message_Flash.Checked = gf.MessageAlertFlash;
			this.Message_Scroll.Checked = gf.MessageAlertScroll;
			this.Message_Transparent.Checked = gf.MessageAlertTransparent;
			this.tbLyricsAlert.Text = gf.LyricsAlertDetails;
			this.TimerRestoreWindow.Start();
		}
		private void BtnStop_Click(object sender, EventArgs e)
		{
			gf.MessageAlertLive = false;
			gf.ParentalAlertLive = false;
		}
		private void BtnCancel_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void LoadAlertList()
		{
			gf.LoadComboBoxFromTextFile(ref this.cbMessageAlert, gf.AlertsDataFile);
			gf.LoadComboBoxFromTextFile(ref this.cbParentalAlert, gf.ParentalDataFile);
		}
		private void ParentalShow_Click(object sender, EventArgs e)
		{
			gf.ParentalAlertDetails = gf.Trim(this.cbParentalAlert.Text);
			if (!(gf.ParentalAlertDetails == ""))
			{
				if (this.cbParentalAlert.Items.Count == 0 || this.cbParentalAlert.Text != this.cbParentalAlert.Items[0].ToString())
				{
					try
					{
						this.cbParentalAlert.Items.Insert(0, this.cbParentalAlert.Text);
						if (this.cbParentalAlert.Items.Count > 20)
						{
							for (int i = this.cbParentalAlert.Items.Count; i >= 21; i--)
							{
								this.cbParentalAlert.Items.RemoveAt(i);
							}
						}
						gf.SaveComboBoxToTextFile(ref this.cbParentalAlert, gf.ParentalDataFile);
					}
					catch
					{
					}
				}
                //this.OnMessage(1, "");
			}
		}
		private void MessageShow_Click(object sender, EventArgs e)
		{
			gf.MessageAlertDetails = gf.Trim(this.cbMessageAlert.Text);
			if (!(gf.MessageAlertDetails == ""))
			{
				this.cbMessageAlert.Text = gf.Trim(this.cbMessageAlert.Text);
				if (this.cbMessageAlert.Items.Count == 0 || this.cbMessageAlert.Text != this.cbMessageAlert.Items[0].ToString())
				{
					try
					{
						this.cbMessageAlert.Items.Insert(0, this.cbMessageAlert.Text);
						if (this.cbMessageAlert.Items.Count > 20)
						{
							for (int i = this.cbMessageAlert.Items.Count; i >= 21; i--)
							{
								this.cbMessageAlert.Items.RemoveAt(i);
							}
						}
						gf.SaveComboBoxToTextFile(ref this.cbMessageAlert, gf.AlertsDataFile);
					}
					catch
					{
					}
				}
                //this.OnMessage(0, "");
			}
		}
		private void FrmShowAlert_FormClosing(object sender, FormClosingEventArgs e)
		{
			this.SaveFormLocation();
			gf.SaveOptionsData();
			this.TimerRestoreWindow.Stop();
			gf.AlertFormOpen = false;
		}
		private void SaveFormLocation()
		{
			gf.SaveRegValue("settings", this.FormRegLeft, base.Left);
			gf.SaveRegValue("settings", this.FormRegTop, base.Top);
		}
		private void TimerRestoreWindow_Tick(object sender, EventArgs e)
		{
			if (gf.AlertRestoreWindow)
			{
				gf.AlertRestoreWindow = false;
				if (base.WindowState == FormWindowState.Minimized)
				{
					base.WindowState = FormWindowState.Normal;
				}
				else
				{
					base.Focus();
				}
				base.TopMost = true;
				base.TopMost = false;
			}
		}
		private void ScrollFlashOption_Click(object sender, EventArgs e)
		{
			gf.ParentalAlertScroll = this.Parental_Scroll.Checked;
			gf.ParentalAlertFlash = this.Parental_Flash.Checked;
			gf.ParentalAlertTransparent = this.Parental_Transparent.Checked;
			gf.MessageAlertScroll = this.Message_Scroll.Checked;
			gf.MessageAlertFlash = this.Message_Flash.Checked;
			gf.MessageAlertTransparent = this.Message_Transparent.Checked;
		}
		private void btnClearHistoryMessage_Click(object sender, EventArgs e)
		{
			this.cbMessageAlert.Items.Clear();
			this.cbMessageAlert.Text = "";
			gf.MessageAlertDetails = "";
			gf.SaveComboBoxToTextFile(ref this.cbMessageAlert, gf.AlertsDataFile);
		}
		private void btnClearHistoryParental_Click(object sender, EventArgs e)
		{
			this.cbParentalAlert.Items.Clear();
			this.cbParentalAlert.Text = "";
			gf.ParentalAlertDetails = "";
			gf.SaveComboBoxToTextFile(ref this.cbParentalAlert, gf.ParentalDataFile);
		}
		private void cbParentalAlert_Enter(object sender, EventArgs e)
		{
			base.AcceptButton = this.ParentalShow;
		}
		private void cbMessageAlert_Enter(object sender, EventArgs e)
		{
			base.AcceptButton = this.MessageShow;
		}
		private void tbLyricsAlert_Enter(object sender, EventArgs e)
		{
			base.AcceptButton = this.LyricsShow;
		}
		private void LyricsShow_Click(object sender, EventArgs e)
		{
			gf.LyricsAlertDetails = gf.Trim(this.tbLyricsAlert.Text);
			if (!(gf.LyricsAlertDetails == ""))
			{
				this.tbLyricsAlert.Text = gf.Trim(this.tbLyricsAlert.Text);
                //this.OnMessage(2, "");
			}
		}
		private void btnClearLyrics_Click(object sender, EventArgs e)
		{
			this.tbLyricsAlert.Text = "";
			gf.LyricsAlertDetails = "";
            //this.OnMessage(2, "");
		}
	}
}
